package com.dong;

/**
 * @program: javase
 * @description:
 * @author: lld
 * @create: 2021-03-05 16:48
 **/
public class Demo1 {
    public static String sRet = "";

    public static void func(int i) {
        try {
            if (i % 2 == 0) {
                throw new Exception();
            }
        } catch (Exception e) {
            sRet += "0";
            return;
        } finally {
            sRet += "1";
        }
        sRet += "2";
    }

    public static void main(String[] args) {
        func(1);
        func(2);
        System.out.println(sRet);
    }
}